﻿@model ADShop.Models.Product

@{
    ViewBag.Title = "Edit";
    Layout = "~/Areas/Admin/Views/Shared/_LayoutPage_Admin.cshtml";
}

<h2>Sửa Sản Phẩm @Model.NameProduct</h2>

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Product</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.IDProduct)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.IDProduct)
            @Html.ValidationMessageFor(model => model.IDProduct)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IDStatus, "StatusProduct")
        </div>
        <div class="editor-field">
            @Html.DropDownList("IDStatus", String.Empty)
            @Html.ValidationMessageFor(model => model.IDStatus)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IDCategory, "Category")
        </div>
        <div class="editor-field">
            @Html.DropDownList("IDCategory", String.Empty)
            @Html.ValidationMessageFor(model => model.IDCategory)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IDPromotions, "PromotionsProduct")
        </div>
        <div class="editor-field">
            @Html.DropDownList("IDPromotions", String.Empty)
            @Html.ValidationMessageFor(model => model.IDPromotions)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IDBrand, "Brand")
        </div>
        <div class="editor-field">
            @Html.DropDownList("IDBrand", String.Empty)
            @Html.ValidationMessageFor(model => model.IDBrand)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.NameProduct)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.NameProduct)
            @Html.ValidationMessageFor(model => model.NameProduct)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TrialDay)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TrialDay)
            @Html.ValidationMessageFor(model => model.TrialDay)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ListedPrice)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ListedPrice)
            @Html.ValidationMessageFor(model => model.ListedPrice)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PriceProduct)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PriceProduct)
            @Html.ValidationMessageFor(model => model.PriceProduct)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Rewards)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Rewards)
            @Html.ValidationMessageFor(model => model.Rewards)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ProductImage)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ProductImage)
            @Html.ValidationMessageFor(model => model.ProductImage)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Active)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Active)
            @Html.ValidationMessageFor(model => model.Active)
        </div>

        <p>
            <input type="submit" value="Save" class="btn btn-green" />
        </p>
    </fieldset>
      @*<div class="panel-body">
            <table class="table table-hover" id="sample-table-1">
                <thead>
                    <tr>


                        <th>@Html.DisplayNameFor(model => model.IDProduct)</th>
                        <th>@Html.DisplayNameFor(model => model.IDStatus)</th>
                        <th>@Html.DisplayNameFor(model => model.IDCategory)</th>
                        <th>@Html.DisplayNameFor(model => model.IDPromotions)</th>
                        <th>@Html.DisplayNameFor(model => model.IDBrand)</th>
                        <th>@Html.DisplayNameFor(model => model.NameProduct)</th>
                        <th>@Html.DisplayNameFor(model => model.Description)</th>
                        <th>@Html.DisplayNameFor(model => model.TrialDay)</th>

                        <th>@Html.DisplayNameFor(model => model.ListedPrice)</th>
                        <th>@Html.DisplayNameFor(model => model.PriceProduct)</th>
                        <th>@Html.DisplayNameFor(model => model.Rewards)</th>
                        <th>@Html.DisplayNameFor(model => model.ProductImage)</th>

                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>
                            <div class="editor-field">
                                @Html.DisplayFor(model => model.IDProduct)
                                @Html.ValidationMessageFor(model => model.IDProduct)
                            </div>
                        </td>

                        <td>
                            <div class="editor-field">
                                @Html.DropDownList("IDStatus", String.Empty)
                                @Html.ValidationMessageFor(model => model.IDStatus)
                            </div>
                        </td>
                        <td>
                            <div class="editor-field">
                                <div class="editor-field">
                                    @Html.DropDownList("IDCategory", String.Empty)
                                    @Html.ValidationMessageFor(model => model.IDCategory)
                                </div>
                            </div>
                        </td>
                        <td>
                            <div class="editor-field">
                                @Html.DropDownList("IDPromotions", String.Empty)
                                @Html.ValidationMessageFor(model => model.IDPromotions)
                            </div>

                          
                           
                        </td>
                        <td>
                            <div class="editor-field">
                                @Html.DropDownList("IDBrand", String.Empty)
                                @Html.ValidationMessageFor(model => model.IDBrand)
                            </div>
                        </td>
                        <td>
                            <div class="editor-field">
                                @Html.EditorFor(model => model.NameProduct)
                                @Html.ValidationMessageFor(model => model.NameProduct)
                            </div>
                        </td>
                        <td>
                            <div class="editor-field">
                                @Html.EditorFor(model => model.Description)
                                @Html.ValidationMessageFor(model => model.Description)
                            </div>
                        </td>
                        <td>
                            <div class="editor-field">
                                @Html.EditorFor(model => model.TrialDay)
                                @Html.ValidationMessageFor(model => model.TrialDay)
                            </div>
                        </td>
                        <td>
                            <div class="editor-field">
                                @Html.EditorFor(model => model.ListedPrice)
                                @Html.ValidationMessageFor(model => model.ListedPrice)
                            </div>
                        </td>
                        <td>
                            <div class="editor-field">
                                @Html.EditorFor(model => model.PriceProduct)
                                @Html.ValidationMessageFor(model => model.PriceProduct)
                            </div>
                        </td>
                        <td>
                            <div class="editor-field">
                                @Html.EditorFor(model => model.Rewards)
                                @Html.ValidationMessageFor(model => model.Rewards)
                            </div>
                        </td>
                       
                        <td>
                            <div class="editor-field">
                                @Html.EditorFor(model => model.ProductImage)
                                @Html.ValidationMessageFor(model => model.ProductImage)
                            </div>
                        </td>

                    </tr>
                    



                </tbody>


            </table>

        </div>
        <p>
            <input type="submit" value="Save" />
        </p>*@
    
}

<div>
    <p>
        @Html.ActionLink("Bảng Danh Sách Sản Phẩm", "Index", null, new { @class = "label label-default" })
    </p>
</div>